<!DOCTYPE html>
<html>
<head>
	<title>商城首页</title>
	<meta charset="utf-8">
    <script type="text/javascript">
        if (/Android (\d+\.\d+)/.test(navigator.userAgent)) {
            var version = parseFloat(RegExp.$1);
            if (version > 2.3) {
                var phoneScale = parseInt(window.screen.width) / 750;
                document.write('<meta name="viewport" content="width=750,minimum-scale=' + phoneScale + ',maximum-scale=' + phoneScale + ',target-densitydpi=device-dpi">');
            } else {
                document.write('<meta name="viewport" content="width=750,target-densitydpi=device-dpi">');
            }
        } else {
            document.write('<meta name="viewport" content="width=750,user-scalable=no,target-densitydpi=device-dpi,minimal-ui">');
        }
    </script>
    <link rel="stylesheet" type="text/css" href="/tpl/Wap/default/common/css/newgoods/css/index.css">
    <link rel="stylesheet" type="text/css" href="/tpl/Wap/default/common/css/newgoods/css/common.css">
    <link rel="stylesheet" type="text/css" href="/tpl/Wap/default/common/css/newgoods/css/swiper.min.css">
    <script type="text/javascript" src="/tpl/Wap/default/common/css/newgoods/js/swiper.min.js"></script>
    <script type="text/javascript">
	 var iWidth=document.documentElement.getBoundingClientRect().width;iWidth=iWidth>750?750:iWidth;
     document.getElementsByTagName("html")[0].style.fontSize=iWidth/10+"px";
	</script>
</head>
<body>
<div class="wrap">
  <header class="topHeader clearfix">
  	<div class="logoImg"><img src="tpl/Wap/default/common/css/newgoods/images/logo.png"><p>悠游堂官方旗舰店</p></div>
  </header>
  <section class="bannerSwiper">
        <div class="swiper-container">
           <div class="swiper-wrapper">
              <div class="swiper-slide"><a href="http://weixin.yuyuto.com/index.php?g=Wap&m=Store&a=cats&token=recqdx1419584890&cid=21&parentid=220&wecha_id=ozrbYt33jNopGWU0HYwbN0FYA3yA&twid=&from=singlemessage&isappinstalled=0"><img src="tpl/Wap/default/common/css/newgoods/images/banner01.jpg"></a></div>
              <div class="swiper-slide"><a href="http://t.cn/RclmEaN"><img src="tpl/Wap/default/common/css/newgoods/images/banner02.jpg"></a></div>
              <div class="swiper-slide"><a href="http://open.yilucaifu.com/insurance/sdk/recoindex.html?customkey=yuyuto#offCanvasSide"><img src="tpl/Wap/default/common/css/newgoods/images/banner03.jpg"></a></div>
              <div class="swiper-slide"><a href="http://weixin.yuyuto.com/index.php?g=Wap&m=Store&a=products&token=recqdx1419584890&wecha_id=&catid=294"><img src="tpl/Wap/default/common/css/newgoods/images/banner04.jpg"></a></div>
           </div>
        <div class="swiper-pagination"></div>
        </div>
  </section>
  <section class="brandZone01">
    <div class="brandTitle01">
      <span>热门促销</span>
      <div class="onePx01"></div>
    </div>
  </section>
  <section class="hotSales01">
       <div class="hotProducts01 clearfix">
            <a href="http://m.zk100.com/md/shop/id/00000000004" class="borderLeft"><img src="tpl/Wap/default/common/css/newgoods/images/hotsale01.jpg"></a>
            <a href="http://weixin.yuyuto.com/index.php?g=Wap&m=Store&a=products&token=recqdx1419584890&catid=197&wecha_id=ozrbYt2txUCQEGPSRF0cpTECOhLY&twid"><img src="tpl/Wap/default/common/css/newgoods/images/hotsale02.jpg"></a>
            <a href="http://weixin.yuyuto.com/index.php?g=Wap&m=Store&a=products&token=recqdx1419584890&catid=289&twid=Llb285180&cid=21&from=singlemessage&isappinstalled=0"><img src="tpl/Wap/default/common/css/newgoods/images/hotsale03.jpg"></a>
            <a href="http://wx.yuyuto.com/public/wx/yb-recharge"><img src="tpl/Wap/default/common/css/newgoods/images/hotsale04.jpg"></a>
       </div>
  </section>
  <section class="activity01">
    <a href="http://weixin.yuyuto.com/index.php?g=Wap&m=Store&a=cats&token=recqdx1419584890&cid=21&parentid=220&wecha_id=ozrbYt33jNopGWU0HYwbN0FYA3yA&twid=&from=singlemessage&isappinstalled=0"><img src="tpl/Wap/default/common/css/newgoods/images/youhui.jpg"></a>
  </section>
  <section class="brandZone01">
    <div class="brandTitle01">
      <span>品牌专区</span>
      <div class="onePx01"></div>
    </div>
  </section>
  <section class="brandType01">
      <div class="brandCon01 clearfix">
        <a href="http://weixin.yuyuto.com/index.php?g=Wap&m=Store&a=products&token=recqdx1419584890&catid=292&wecha_id=ozrbYt2txUCQEGPSRF0cpTECOhLY&twid"><img src="tpl/Wap/default/common/css/newgoods/images/brand01.jpg"></a>
        <a href="http://weixin.yuyuto.com/index.php?g=Wap&m=Store&a=products&token=recqdx1419584890&catid=289&twid=Llb285180&cid=21&from=singlemessage&isappinstalled=0"><img src="tpl/Wap/default/common/css/newgoods/images/brand02.jpg"></a>
        <a href="http://weixin.yuyuto.com/index.php?g=Wap&m=Store&a=products&token=recqdx1419584890&catid=287&wecha_id=ozrbYt2txUCQEGPSRF0cpTECOhLY&twid"><img src="tpl/Wap/default/common/css/newgoods/images/brand03.jpg"></a>
      </div>
  </section>
<!-- 2016-1028-->
	<section class="sellType clearfix">
		<ul class="sellList" id="sellList">
			<?php foreach ($cat as $k => $v):?>
			<li class="<?php if($k == 0) echo "active";?> grey2"><span></span><a href="javascript:;">{pigcms:$v.name}</a></li>
			<?php endforeach;?>
		</ul>
		<?php foreach ($product as $k => $v):?>
		<div class="sellCon" style="display: <?php if($k == 0) echo "block";?>;">
			<div class="sellConList clearfix">
				<?php foreach ($v as $k1 => $v1):?>
				<if condition="$k1 lt 4 ">
				<div class="sellConList01">
					<div>
						<a href="/index.php?g=Wap&m=Newgoods&a=productDetail&token={pigcms:$token}&wecha_id={pigcms:$wecha_id}&id={pigcms:$v1['id']}"><img src="<?php if($v1['logourl']){?>{pigcms:$v1.logourl}<?php }else{?>{pigcms:$url}/tpl/Wap/default/common/css/newgoods/images/error.png<?php }?>"></a>
						<a href="/index.php?g=Wap&m=Newgoods&a=productDetail&token={pigcms:$token}&wecha_id={pigcms:$wecha_id}&id={pigcms:$v1['id']}" style="height:70px;display:block;"><p class="opdd">{pigcms:$v1.name}</p></a>
						<p><span><small>￥</small>{pigcms:$v1.price}</span><span class="grey s6"><small>￥</small>{pigcms:$v1.oprice}</span></p>
						<p>{pigcms:$v1['salecount'] + $v1['fakemembercount']}人已付款</p>
					</div>
				</div>
				</if>			
			<?php endforeach;?>
			</div>
			<?php if(count($v) > 4 ){?><div class="more textRight"><a href="/index.php?g=Wap&m=Newgoods&a=goodList&token={pigcms:$token}&wecha_id={pigcms:$wecha_id}&catid={pigcms:$v['0']['catid']}">查看更多商品>></a></div><?php }?>
		</div>
	<?php endforeach;?>
	</section>
</div>
<div class="hasfixed clearfix">
	<div class="dh">

		<a href="/index.php?g=Wap&m=Newgoods&a=index&token={pigcms:$token}&wecha_id={pigcms:$wecha_id}" class="borderRight">首页</a>
		<a href="/index.php?g=Wap&m=Newgoods&a=orderList&token={pigcms:$token}&wecha_id={pigcms:$wecha_id}" class="borderRight">全部订单</a>
		<a href="/index.php?g=Wap&m=Newgoods&a=cart&token={pigcms:$token}&wecha_id={pigcms:$wecha_id}">购物车<span class="oNum"><if condition="($totalProductCount neq 0) AND ($totalProductCount elt 99)" >{pigcms:$totalProductCount}<elseif condition="$totalProductCount gt 99"/>99+<else />0</if></span></a>
	</div>
</div>
<script type="text/javascript">
var oUl=document.getElementById("sellList");
var oLi=oUl.getElementsByTagName("li");
var oDiv=document.getElementsByClassName("sellCon");
var osellType=document.getElementsByClassName('sellType')[0].offsetHeight;

for(var i=0;i<oLi.length;i++){
      oLi[i].index=i;
      oLi[i].onclick=function(){
      	//resizeHeigh(oDiv[this.index]);
      	for(var j=0;j<oDiv.length;j++){
      		oDiv[j].style.display="none";
      		oLi[j].className="grey2";
      	}
       oDiv[this.index].style.display="block";
       this.className="active";
       this.setAttribute("idvalue","me"+this.index);
       oDiv[this.index].setAttribute("idvalue","me"+this.index)
      }
}
function lineHeight(ali){
	var Len=ali.getElementsByTagName('a')[0].innerHTML;
	if(Len.length>7){
		ali.style.lineHeight="60px";
	}else{
		ali.style.lineHeight="120px";
	}
}
function line(){
	for(var i=0;i<oLi.length;i++){
		lineHeight(oLi[i]);
	}
}
line()

function resizeHeigh(ob){
	var oHeight=oUl.clientHeight;
	var oH1=ob.offsetHeight;
	if(oH1<oHeight){
		ob.style.height=oHeight+300+'px';
	}
}

function view() {
    return {
        w: document.documentElement.clientWidth,
        h: document.documentElement.clientHeight
    };
}

function oH(){
	var oHeight=oUl.clientHeight;
	oUl.style.height=osellType>oHe?osellType:oHe+"px"
}
oH();
var mySwiper = new Swiper('.swiper-container',{
   loop:true,
   pagination : '.swiper-pagination',
   paginationClickable :true,
   autoplay: 2500,
   autoplayDisableOnInteraction: false
  });
</script>

</body>
</html>